<template>
  <div style="width: 97%;">
    <h3>党建工作情况 </h3>

    <el-form :model="postForm" ref="postFormRef" size="default" :rules="postRules" label-width="200px">
      <el-row :gutter="20">
        <el-col :span="24" style="margin-bottom: 15px;">
          <el-form-item prop="partyOrganization" label="是否建立党组织" :label-position="top" label-width="200px">
            <el-select clearable @change="partyOrganizationChange" style="width:100%;"
                       v-model="postForm.partyOrganization" placeholder="请选择">
              <el-option v-for="dict in shiOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="24" style="margin-bottom: 15px;">
          <el-form-item v-if="postForm.partyOrganization != 1" prop="notCreatePartyReason" label="未建党组织原因"
                        label-position="top" label-width="200px">
            <el-input placeholder="请输入" v-model="postForm.notCreatePartyReason" />
          </el-form-item>
        </el-col>
        <el-col :span="24" style="margin-bottom: 15px;">
          <el-form-item prop="partyBuildSocialistCoreValuesConstitution" label-position="top" label-width="200px"
                        label="是否将党的建设和社会主义核心价值观写入章程">
            <el-select clearable style="width:100%;" v-model="postForm.partyBuildSocialistCoreValuesConstitution"
                       placeholder="请选择">
              <el-option v-for="dict in shiOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="24" style="margin-bottom: 15px;">
          <el-form-item v-if="postForm.partyBuildSocialistCoreValuesConstitution != 1"
                        prop="partyBuildConstitutionReason" label-width="200px" label-position="top"
                        label="未将党的建设和社会主义核心价值观写入章程原因">
            <el-input placeholder="请输入" v-model="postForm.partyBuildConstitutionReason" />
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="postForm.partyOrganization == 1">
          <el-row>
            <el-col :span="23">
              <span style="font-size: 16px;font-weight: bold;line-height: 36px;">基本情况</span>
            </el-col>
            <el-col :span="12" style="margin-bottom: 15px;">
              <el-form-item prop="partyBuildingName" label="党组织名称">
                <el-input placeholder="请输入" v-model="postForm.partyBuildingName">
                </el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12" style="margin-bottom: 15px;">
              <el-form-item prop="partyBuildingType" label="党组织类型">
                <el-select clearable style="width:100%;" v-model="postForm.partyBuildingType" placeholder="请选择">
                  <el-option v-for="dict in typePartyOrgOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12" style="margin-bottom: 15px;">
              <el-form-item prop="partyBuildingRelationship" label="党组织隶属关系">
                <el-select clearable style="width:100%;" v-model="postForm.partyBuildingRelationship"
                           placeholder="请选择">
                  <el-option v-for="dict in partyAffiliationOptions" :key="dict.id" :label="dict.name"
                             :value="dict.id" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12" style="margin-bottom: 15px;">
              <el-form-item prop="partyBuildingSecretaryName" label="党组织书记姓名">
                <el-input placeholder="请输入" v-model="postForm.partyBuildingSecretaryName"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12" style="margin-bottom: 15px;">
              <el-form-item prop="partyBuildingSecretaryDirectorPosition" label="社会组织中所任职务">
                <el-input placeholder="请输入" v-model="postForm.partyBuildingSecretaryDirectorPosition"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12" style="margin-bottom: 15px;">
              <el-form-item prop="partyBuildingSecretaryPhone" label="手机号码">
                <el-input placeholder="请输入" type="number" v-model="postForm.partyBuildingSecretaryPhone"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12" style="margin-bottom: 15px;">
              <el-form-item prop="internalGovernanceSituation" label="参与内部治理情况">
                <el-select clearable style="width:100%;" v-model="postForm.internalGovernanceSituation"
                           placeholder="请选择">
                  <el-option v-for="dict in joinInsideGovernOptions" :key="dict.id" :label="dict.name"
                             :value="dict.id" />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="23">
              <span style="font-size: 16px;font-weight: bold;line-height: 36px;">党建工作联系人</span>
            </el-col>
            <el-col :span="12" style="margin-bottom: 15px;">
              <el-form-item prop="partyWorkContactName" label="姓名">
                <el-input placeholder="请输入" v-model="postForm.partyWorkContactName"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12" style="margin-bottom: 15px;">
              <el-form-item prop="partyWorkContactDirectorPosition" label="在社会组织中所任职务">
                <el-input placeholder="请输入" v-model="postForm.partyWorkContactDirectorPosition"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12" style="margin-bottom: 15px;">
              <el-form-item prop="partyWorkContactPhone" label="手机号码（对外公布隐去）">
                <el-input placeholder="请输入" type="number" v-model="postForm.partyWorkContactPhone"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
        </el-col>
        <el-col :span="23">
          <span style="font-size: 16px;font-weight: bold;line-height: 36px;">党员人数</span>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="partyMembersCount" label="党员总人数">
            <el-input placeholder="请输入" type="number" v-model="postForm.partyMembersCount">
              <template #append>人</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="partyMembersWomanCount" label="其中：女党员人数">
            <el-input placeholder="请输入" type="number" v-model="postForm.partyMembersWomanCount">
              <template #append>人</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="ageHirtyFiveCount" label="35岁以下党员人数">
            <el-input placeholder="请输入" type="number" v-model="postForm.ageHirtyFiveCount">
              <template #append>人</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="ageHirtySixCount" label="36岁至45岁党员人数">
            <el-input placeholder="请输入" type="number" v-model="postForm.ageHirtySixCount">
              <template #append>人</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="ageFortyFiveCount" label="45岁以上党员人数">
            <el-input placeholder="请输入" type="number" v-model="postForm.ageFortyFiveCount">
              <template #append>人</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="schoolJuniorCount" label="初中以下党员人数">
            <el-input placeholder="请输入" type="number" v-model="postForm.schoolJuniorCount">
              <template #append>人</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="schoolHighCount" label="高中(中专、大专)党员人数">
            <el-input placeholder="请输入" type="number" v-model="postForm.schoolHighCount">
              <template #append>人</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="schoolUniversityCount" label="本科以上党员人数">
            <el-input placeholder="请输入" type="number" v-model="postForm.schoolUniversityCount">
              <template #append>人</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="partyMembersFlowCount" label="流动党员数">
            <el-input placeholder="请输入" type="number" v-model="postForm.partyMembersFlowCount">
              <template #append>人</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="partyMembersTemporaryCount" label="持临时组织关系人数">
            <el-input placeholder="请输入" type="number" v-model="postForm.partyMembersTemporaryCount">
              <template #append>人</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="partyMembersFlowCardCount" label="持流动党员活动证人数">
            <el-input placeholder="请输入" type="number" v-model="postForm.partyMembersFlowCardCount">
              <template #append>人</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="partyMembersFullTimeCount" label="专职人员中党员人数">
            <el-input placeholder="请输入" type="number" v-model="postForm.partyMembersFullTimeCount">
              <template #append>人</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="partyMembersPartTimeCount" label="兼职人员中党员人数">
            <el-input placeholder="请输入" type="number" v-model="postForm.partyMembersPartTimeCount">
              <template #append>人</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="partyWorkFullTimeCount" label="专职党务工作者人数">
            <el-input placeholder="请输入" type="number" v-model="postForm.partyWorkFullTimeCount">
              <template #append>人</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="partyWorkPartTimeCount" label="兼职党务工作者人数">
            <el-input placeholder="请输入" type="number" v-model="postForm.partyWorkPartTimeCount">
              <template #append>人</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="23">
          <span style="font-size: 16px;font-weight: bold;line-height: 36px;">最近两年发展党员情况 </span>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="partyWorkBeforeYears" label="上一年发展党员人数">
            <el-input placeholder="请输入" type="number" v-model="postForm.partyWorkBeforeYears">
              <template #append>人</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="partyWorkLastYears" label="当年年发展党员人数">
            <el-input placeholder="请输入" type="number" v-model="postForm.partyWorkLastYears">
              <template #append>人</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="23">
          <span style="font-size: 16px;font-weight: bold;line-height: 36px;">活动情况</span>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="specialEventVenue" label="是否有专门活动场所">
            <el-select clearable style="width:100%;" v-model="postForm.specialEventVenue" placeholder="请选择">
              <el-option v-for="dict in shiOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="activityFunds" label="活动经费数额">
            <el-input placeholder="请输入" type="number" v-model="postForm.activityFunds">
              <template #append>元/年</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="activityFundsSource" label="活动经费来源">
            <el-select clearable style="width:100%;" v-model="postForm.activityFundsSource" placeholder="请选择">
              <el-option v-for="dict in financeSourceOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="partyMemberConferenceNum" label="党员大会开展次数">
            <el-input placeholder="请输入" type="number" v-model="postForm.partyMemberConferenceNum">
              <template #append>次</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="branchCommitteeNum" label="支委会开展次数">
            <el-input placeholder="请输入" type="number" v-model="postForm.branchCommitteeNum">
              <template #append>次</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="partyGroupNum" label="党小组会开展次数">
            <el-input placeholder="请输入" type="number" v-model="postForm.partyGroupNum">
              <template #append>次</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="partyCoursesNum" label="党课学习次数">
            <el-input placeholder="请输入" type="number" v-model="postForm.partyCoursesNum">
              <template #append>次</template>
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="24" v-if="postForm.partyOrganization == 2">
          <span style="font-size: 18px;font-weight: bold;line-height: 36px;">现有妇女人数</span>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;" v-if="postForm.partyOrganization == 2">
          <el-form-item prop="womanNumCount" label="妇女人数">
            <el-input type="number" placeholder="请输入" v-model="postForm.womanNumCount" />
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;" v-if="postForm.partyOrganization == 2">
          <el-form-item prop="ageTwentyEightCount" label="28周岁以下青年人数">
            <el-input type="number" placeholder="请输入" v-model="postForm.ageTwentyEightCount" />
          </el-form-item>
        </el-col>
        <el-col :span="23">
          <span style="font-size: 16px;font-weight: bold;line-height: 36px;">群团工作</span>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="establishingTradeUnions" label="是否建立工会">
            <el-select clearable style="width:100%;" v-model="postForm.establishingTradeUnions" placeholder="请选择">
              <el-option v-for="dict in shiOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="establishingTeam" label="是否建立团组织">
            <el-select clearable style="width:100%;" v-model="postForm.establishingTeam" placeholder="请选择">
              <el-option v-for="dict in shiOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="establishingWomenFederation" label="是否建立妇联">
            <el-select clearable style="width:100%;" v-model="postForm.establishingWomenFederation"
                       placeholder="请选择">
              <el-option v-for="dict in shiOptions" :key="dict.id" :label="dict.name" :value="dict.id" />
            </el-select>
          </el-form-item>

        </el-col>
        <el-col :span="12" style="margin-bottom: 15px;">
          <el-form-item prop="teamActivitieNum" label="群团组织开展活动次数">
            <el-input placeholder="请输入" v-model="postForm.teamActivitieNum"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
<script>
import {
  getDictByCode,
  getTableInfoByPage,
  stSaveDjParty,
} from '@/views/yearCheck/ykb/st/st'

export default {
  data() {
    return {
      typePartyOrgOptions: undefined,
      partyAffiliationOptions: undefined,
      joinInsideGovernOptions: undefined,
      financeSourceOptions: undefined,
      xueliOptions: undefined,
      politicsOptions: undefined,
      sexOptions: [{ id: '1', name: '男' }, { id: '2', name: '女' }],
      shiOptions: [{ id: 1, name: '是' }, { id: 2, name: '否' }],
      postForm: {
        womanNumCount: '',//现有妇女人数
        ageTwentyEightCount: '',//28周岁以下青年人数
        partyBuildingSecretaryPhone: '',//党组织书记手机号
        notCreatePartyReason: '',//未建立党组织原因
        activityFunds: '',//活动经费
        activityFundsSource: '',//活动经费来源
        ageFortyFiveCount: '',//45岁以上党员总人数
        ageHirtyFiveCount: '',//35岁及以下党员总人数
        ageHirtySixCount: '',//36岁至45岁党员总人数
        branchCommitteeNum: '',//支委会次数
        creditCode: localStorage.getItem('creditCode'),//统一社会信用代码
        establishingTeam: '',//是否建立团组织 0-未知、1-是 2-否
        establishingTradeUnions: '',//是否建立工会 0-未知、1-是 2-否
        establishingWomenFederation: '',//是否建立妇联 0-未知、1-是 2-否
        examineYear: localStorage.getItem('examineYear'),//备案年度
        id: '',//
        internalGovernanceSituation: '',//参与内部治理情况
        organizationBaseId: '',//社团组织id
        partyBuildConstitutionReason: '',//未将党的建设和社会主义核心价值观写入章程原因
        partyBuildSocialistCoreValuesConstitution: '',//是否将党的建设和社会主义核心价值观写入章程 0-未知、1-是 2-否
        partyBuildingName: '',//党组织名称
        partyBuildingRelationship: '',//党组织隶属关系1-社会组织党委，2-业务主管单位 3-属地管理
        partyBuildingSecretaryDirectorPosition: '',//党组织书记职务
        partyBuildingSecretaryName: '',//党组织书记名称
        partyBuildingType: '',//党组织类型
        partyCoursesNum: '',//党课次数
        partyGroupNum: '',//党小组会次数
        partyMemberConferenceNum: '',//党员大会次数
        partyMembersCount: '',//党员总人数
        partyMembersFlowCardCount: '',//持流动党员活动证人数
        partyMembersFlowCount: '',//流动党员总人数
        partyMembersFullTimeCount: '',//专职人员中党员人数
        partyMembersPartTimeCount: '',//兼职人员中党员人数
        partyMembersTemporaryCount: '',//持临时组织关系总人数
        partyMembersWomanCount: '',//女性党员总人数
        partyOrganization: '',//是否建立党组织 0-未知、1-是 2-否
        partyWorkContactDirectorPosition: '',//党建工作联系人职务
        partyWorkContactName: '',//党建工作联系人
        partyWorkContactPhone: '',//党建工作联系人电话
        partyWorkFullTimeCount: '',//专职人员中党务工作者人数
        partyWorkPartTimeCount: '',//兼职人员中党务工作者人数
        schoolHighCount: '',//高中党员总人数
        schoolJuniorCount: '',//初中以下党员总人数
        schoolUniversityCount: '',//本科以上党员总人数
        specialEventVenue: '',//专场活动场所
        teamActivitieNum: '',//群团组织活动次
        partyWorkBeforeYears: '',//上一年发展党员数
        partyWorkLastYears: ''//当年发展党员数
      },
      postRules: {
        partyOrganization: [{ required: true, message: '请完善', trigger: 'blur' }],
        partyBuildSocialistCoreValuesConstitution: [{ required: true, message: '请完善', trigger: 'blur' }]
      }
    }
  },
  created() {

  },
  methods: {
    partyOrganizationChange(value) {
      if (value == 1) {
        this.postRules = {
          partyOrganization: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyBuildSocialistCoreValuesConstitution: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyWorkContactDirectorPosition: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyWorkBeforeYears: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyWorkLastYears: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyBuildingSecretaryPhone: [{ required: true, message: '请完善', trigger: 'blur' }],
          activityFunds: [{ required: true, message: '请完善', trigger: 'blur' }],
          activityFundsSource: [{ required: true, message: '请完善', trigger: 'blur' }],
          ageFortyFiveCount: [{ required: true, message: '请完善', trigger: 'blur' }],
          ageHirtyFiveCount: [{ required: true, message: '请完善', trigger: 'blur' }],
          ageHirtySixCount: [{ required: true, message: '请完善', trigger: 'blur' }],
          branchCommitteeNum: [{ required: true, message: '请完善', trigger: 'blur' }],
          establishingTeam: [{ required: true, message: '请完善', trigger: 'blur' }],
          establishingTradeUnions: [{ required: true, message: '请完善', trigger: 'blur' }],
          establishingWomenFederation: [{ required: true, message: '请完善', trigger: 'blur' }],
          internalGovernanceSituation: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyBuildingName: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyBuildingRelationship: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyBuildingSecretaryDirectorPosition: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyBuildingSecretaryName: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyBuildingType: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyCoursesNum: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyGroupNum: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyMemberConferenceNum: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyMembersCount: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyMembersFlowCardCount: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyMembersFlowCount: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyMembersFullTimeCount: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyMembersPartTimeCount: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyMembersTemporaryCount: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyMembersWomanCount: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyWorkContactName: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyWorkContactPhone: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyWorkFullTimeCount: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyWorkPartTimeCount: [{ required: true, message: '请完善', trigger: 'blur' }],
          schoolHighCount: [{ required: true, message: '请完善', trigger: 'blur' }],
          schoolJuniorCount: [{ required: true, message: '请完善', trigger: 'blur' }],
          schoolUniversityCount: [{ required: true, message: '请完善', trigger: 'blur' }],
          specialEventVenue: [{ required: true, message: '请完善', trigger: 'blur' }],
          teamActivitieNum: [{ required: true, message: '请完善', trigger: 'blur' }]
        }
      } else {
        this.postRules = {
          partyOrganization: [{ required: true, message: '请完善', trigger: 'blur' }],
          partyBuildSocialistCoreValuesConstitution: [{ required: true, message: '请完善', trigger: 'blur' }]
        }
      }
    },
    postInfo() {
      this.$refs.postFormRef.validate(valid => {
        if (valid) {
          this.postForm.creditCode = localStorage.getItem('creditCode')
          this.postForm.examineYear = localStorage.getItem('examineYear')
          stSaveDjParty(this.postForm).then(response => {
            this.$message({
              message: '党建工作情况保存成功',
              type: 'success'
            })
            this.getInfo()
          })
        } else {
          this.$message({
            message: '请填写完整',
            type: 'error'
          })
        }
      })

    },
    getInfo() {
      getTableInfoByPage(7).then(response => {
        this.postForm = JSON.parse(JSON.stringify(response.data).replace(/null/g, '""'))
        this.postForm.partyBuildingRelationship += ''
        this.postForm.specialEventVenue = Number(this.postForm.specialEventVenue)
        if (this.postForm.specialEventVenue == null || this.postForm.specialEventVenue == 0) {
          this.postForm.specialEventVenue = ''
        }
      })

      //政治面貌politics
      getDictByCode('politics').then(response => {
        this.politicsOptions = response.data
      })
      //学历xueli
      getDictByCode('xueli').then(response => {
        this.xueliOptions = response.data
      })
      //党组织类型
      getDictByCode('typePartyOrg').then(response => {
        this.typePartyOrgOptions = response.data
      })
      //党组织隶属关系
      getDictByCode('partyAffiliation').then(response => {
        this.partyAffiliationOptions = response.data
      })
      //参与内部治理情况
      getDictByCode('joinInsideGovern').then(response => {
        this.joinInsideGovernOptions = response.data
      })
      //活动经费来源
      getDictByCode('financeSource').then(response => {
        this.financeSourceOptions = response.data
      })
    }
  }
}
</script>
<style scoped lang="scss">
.el-table {
  --el-table-row-hover-bg-color: rgba(39, 137, 238, 0.1);
  --el-table-border-color: #e0e5f0;
}

:deep(.el-card.is-always-shadow) {
  box-shadow: 0 1px 14px 0 rgba(209, 224, 239, 0.6)
}

/* 拉框选中 */
.el-select-dropdown__item {
  height: 24px;
  line-height: 24px;
  font-size: 12px;
}

/* 鼠标经过下拉框 */
.el-select-dropdown__item:hover {
  height: 24px;
  line-height: 24px;
  font-size: 12px;
}

.el-select-dropdown__item.selected {
  color: #2789EE;
}

.app-container {
  margin-top: 40px;
  margin-left: 15%;
  width: 70%;
}

.div-bg {
  width: 100%;
  background: #F0F0F0;
  height: 10px;
}

.box-card {
  width: 100%;
  margin-top: 20px;
  padding: 20px;
}

.el-col {
  padding-left: 5px;
}

.divider-title {
  font-weight: bold;
  font-size: 16px;
}

.custom-select .el-select-dropdown {
  max-height: 600px;
  /* 设置为你想要的高度 */
  overflow: auto;
  /* 添加滚动条 */
}

table {
  border-collapse: collapse;
  /* 确保表格的边框合并为单一边框 */
  width: 100%;
  /* 表格宽度 */
}

td {
  border: 1px solid #ababab;
  /* 设置单线边框 */
  padding: 6px;
  /* 单元格内边距 */
}

.el-form-item {
  margin-bottom: 0px;
}

:deep(.el-form-item__label) {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  text-align: right;
  height: 32px;
  line-height: 16px;
}
</style>
